#ifndef __ULUI_INPUTPAD_H__
#define __ULUI_INPUTPAD_H__

#include "ULUI_MenuList.h"
#include "VSDL_point.h"
#include "VSDL_text.h"
#include <list>

#define MAX_STRING_SIZE		32

using namespace std;

class ULUI_InputPad{
private:
	VSDL_Point startXY;
	list<char> keysymList;
	list<char>::iterator iter;
	int fontWidth;
	int fontHeight;
	VSDL_RGB bgRGB; //Default is grey 
	VSDL_RGB boarderRGB; //Default is black
	bool solidBg; //Is background solid or transparent, default false
	char str[MAX_STRING_SIZE];
	ULUI_MenuList buttons;
public:
	ULUI_InputPad();
	void SetFont(VSDL_Font *font);
	void SetStartXY(VSDL_Point point);
	void EnableSolidBg(bool enabled);
	void SetBgColor(VSDL_RGB rgb); //Only valid when solidBg is true
	void SetBoarderRGB(VSDL_RGB rgb);
	void UpdateStatus(int mouseX, int mouseY);
	void OnMouseDown(int mouseX, int mouseY);
	void PushKeysym(SDLKey keysym); //Only accept numbers , "-" and "backspace"
	void PopKeysym();
	void ClearString();
	char *GetString(); //Get user input string
	void Reset();
	void Show(SDL_Surface *destSurf);
};

#endif /*__ULUI_INPUTPAD_H__*/
